The main component of the analysis is the identification of important seasonal trends in both sets of temperature data. This is done manually using singular spectrum analysis (SSA). Resulting periods are then incorporated into linear mixed models which also include a random intercept for location and geographical parameters (elevation, longitude, and latitude). Results of the analysis are shown below:

As far as minimum monthly average temperatures go, we see an overall average increasing trend of approximately .032 \(^\circ\)C per year. Some cities, such as Mango, have much greater variability in temperatures, but the trend persists. In other cities like Niamtougou, observed temperatures do not appear to be rising as dramatically, but we still expect an increase due to the overall global trend.

In the average monthly maximum temperatures, the increasing trend of 0.019 \(^\circ\)C per year is not quite as alarming as the trend in the minima, but worrisome nonetheless. Once again, there is heterogeneity across cities, but the global trend persist throughout most and the singular spectrum analysis appears to have adequately captured seasonal trends.

3D Visualization of the impact of Geography

Here I’ve included an interactive 3D visualization of the impact of latitude and longitude on both models. Feel free to play around with these some.

# Minimum temperature model
min_geo_coef <- coef(summary(min_model))[c('Longitude','Latitude', 
                                           'I(Latitude^2)','I(Longitude^2)',
                                           'I(Latitude * Longitude)'),
                                         'Estimate']
min_geo <- function(long, lat){
  cbind(long, lat, lat^2, long^2, long*lat) %*% min_geo_coef
}
rgl::open3d()
## null 
##    5
rgl::plot3d(min_geo, 
            col = colorRampPalette(c("blue", "white", "red")), 
            xlab = "longitude", ylab = "latitude", zlab = "GeoMinTrend", 
            xlim = c(0,2), ylim = c(6,12),
            aspect = c(1, 1, 0.5))
# Maximum temperature model
max_geo_coef <- coef(summary(max_model))[c('Longitude','Latitude', 
                                           'I(Latitude^2)','I(Longitude^2)',
                                           'I(Latitude * Longitude)'),
                                         'Estimate']

max_geo <- function(long, lat){
  cbind(long, lat, lat^2, long^2, long*lat) %*% max_geo_coef
}

rgl::open3d()
## null 
##    8
rgl::plot3d(max_geo, 
            col = colorRampPalette(c("blue", "white", "red")), 
            xlab = "Longitude", ylab = "Latitude", zlab = "GeoMaxTrend", 
            xlim = c(0,2), ylim = c(6,12),
            aspect = c(1, 1, 0.5))